package nl.scalasim

/**
 * A PathFinder is a strategy that determines a short path between two nodes.
 * Ideally, this is the shortest possible path, but implementations of
 * this algorithm can make a trade-off between optimality and speed. 
 *
 * @author Yigal Duppen
 * @since Oct 6, 2010
 */
trait PathFinder[N] {

  /**
   * Returns a path between <code>start</code> and <code>stop</code>.
   * @return None if no path could be constructed; otherwise, this method
   * returns the path (defined as a sequence of all nodes from
   * start (inclusive) to stop (inclusive); 
   */
  def path(start: N, stop: N): Option[Seq[N]]

}